package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayGlassV;
import com.navi.loaddata.core.oracleEntity.array.EtlArrayPdsResultV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellComponentV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellPdsResultV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ChipV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2PdsResultV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfGlassV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfPdsResultV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlPdsResultVMapper {

    EtlPdsResultVMapper INSTANCE = Mappers.getMapper(EtlPdsResultVMapper.class);

    EtlArrayPdsResultV etlGlassToArray(EtlPdsResultV glassVMapper);
    List<EtlArrayPdsResultV> etlGlassToArray(List<EtlPdsResultV> list);


    EtlCfPdsResultV etlGlassToCf(EtlPdsResultV glassVMapper);
    List<EtlCfPdsResultV> etlGlassToCf(List<EtlPdsResultV> list);

    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    EtlCellPdsResultV etlGlassToCell1(EtlPdsResultV glassVMapper);
    List<EtlCellPdsResultV> etlGlassToCell1(List<EtlPdsResultV> list);

    @Mapping(target = "chipId",source = "glassId")//属性名不一致映射
    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    EtlCell2PdsResultV etlGlassToCell2(EtlPdsResultV glassVMapper);
    List<EtlCell2PdsResultV> etlGlassToCell2(List<EtlPdsResultV> list);

}
